<template>
	<view class="myEmpty">
		<view class="empty" :style="'height:'+ height ">
			<image src="/static/cart/custom-empty-image.png"></image>
			<text class="description">{{displayText}}</text>
		</view>
	</view>
</template>

<script>
	export default {
		name:"my-empty",
		props: {
			text: {
				type: String,
				default: '暂无更多'
			}
		},
		computed: {
			displayText(){
				return this.text !== 'true' ? this.text : '暂无更多';
			},
			height(){
				return this.windowHeight - 191 + 'px'
			}
		},
		data() {
			return {
				windowHeight: 0
			};
		},
		beforeMount(){
			this.windowHeight = uni.getSystemInfoSync().windowHeight
		},
	}
</script>

<style lang="scss">
.myEmpty{
	.empty{
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		height: 555px;
		image{
			width: 120px;
			height: 120px;
			display: block;
		}
		.description{
			margin-top: 10px;
		}
	}
}
</style>